import {message} from 'antd'
// 一键复制
export const copyText = (text) => {
  const input = document.createElement('input');
  input.setAttribute('readonly', 'readonly');
  input.setAttribute('value', text);
  document.body.appendChild(input);
  input.setSelectionRange(0, 9999);
  input.select();
  document.execCommand('copy');
  document.body.removeChild(input);
//   提示
  message.success('复制成功');
}